package org.dinnermate.reservation;

import java.util.Date;

import org.dinnermate.layout.Table;

public class ReservationSlot
{
	private Table table;
	private Date startTime;

	public ReservationSlot( Table table, Date startTime )
	{
		this.table = table;
		this.startTime = startTime;
	}

	public ReservationSlot( Table table, long startTimeMilli )
	{
		this(table, new Date(startTimeMilli));
	}

	public Table getTable()
	{
		return table;
	}

	public void setTable( Table table )
	{
		this.table = table;
	}

	public Date getStartTime()
	{
		return startTime;
	}

	public void setStartTime( Date startTime )
	{
		this.startTime = startTime;
	}

	public void setStartTime( long startTimeMilli )
	{
		this.startTime = new Date(startTimeMilli);
	}
	
	public String toString()
	{
		return "Reservation @ "+startTime.getTime()+" @ Table "+table.getID()+" ("+table.getNotes()+")";
	}

}
